<div class="model-header"  >
    <nz-content class="model-body">
        <div class="account-table">
            <app-wallet-table [data]="_data" [titleData]="_config" [page]="_page" (tabelEvent)="onListClick($event)"></app-wallet-table>
        </div>


        <nz-drawer class="cfxq"
            [nzBodyStyle]="{ height: 'calc(100% - 55px)', overflow: 'auto', 'padding-bottom': '53px' }"
            [nzMaskClosable]="false"
            [nzWidth]="920"
            [nzVisible]="visible"
            nzTitle="处方详情"
            (nzOnClose)="close()"
            >
            <form nz-form>
                <div nz-row nzGutter="8">
                    <div nz-col nzSpan="12">
                        <nz-form-item nz-row>
                        <nz-form-label nz-col nzSpan="6">门诊号</nz-form-label>
                        <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                {{_data[0]?.mzh}}
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col nzSpan="12">
                        <nz-form-item nz-row>
                            <nz-form-label nz-col nzSpan="6">就诊状态</nz-form-label>
                            <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                    {{_data[0]?.jzzt}}
                                </nz-form-control>
                            </nz-form-item>
                        </div>
                        <div nz-row nzGutter="8">
                            <div nz-col nzSpan="12">
                                <nz-form-item nz-row>
                                    <nz-form-label nz-col nzSpan="6">开方医生</nz-form-label>
                                    <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                            {{_data[0]?.ys}}
                                        </nz-form-control>
                                    </nz-form-item>
                                </div>
                                <div nz-col nzSpan="12">
                                    <nz-form-item nz-row>
                                        <nz-form-label nz-col nzSpan="6">开方日期</nz-form-label>
                                        <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                            {{_data[0]?.kfsj}}
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>
                <div nz-row nzGutter="8">
                    <div nz-col nzSpan="24">
                        <nz-form-label><strong>病人信息</strong></nz-form-label>
                    </div>
                    <nz-divider></nz-divider>
                    <div nz-col nzSpan="12">
                        <nz-form-item nz-row>
                            <nz-form-label nz-col nzSpan="6">姓名</nz-form-label>
                            <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                {{_data[0]?.hzxm}}
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    
                    <div nz-col nzSpan="12">
                        <nz-form-item nz-row>
                            <nz-form-label nz-col nzSpan="6">就诊卡号</nz-form-label>
                            <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                    {{_data[0]?.jzkh}}
                                </nz-form-control>
                            </nz-form-item>
                        </div>
                    </div>
                    <div nz-col nzSpan="12">
                        <nz-form-item nz-row>
                            <nz-form-label nz-col nzSpan="6">性别</nz-form-label>
                            <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                    {{_data[0]?.sex}}
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    
                    <div nz-col nzSpan="12">
                        <nz-form-item nz-row>
                            <nz-form-label nz-col nzSpan="6">年龄</nz-form-label>
                            <nz-form-control nz-col nzSpan="16" class="my-font-t">
                                    {{_data[0]?.nl}}岁
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>
    
                <div  nzGutter="16">
                    <nz-form-label><strong>诊断名称</strong></nz-form-label>
                    <nz-form-control class="my-font-t">
                            {{_data[0]?.zdmc}}
                    </nz-form-control>
                </div>
                <div nz-row nzGutter="16">
                    <div nz-col nzSpan="24">
                        <nz-form-label><strong>处方内容</strong></nz-form-label>
                        <nz-alert style="margin-bottom: 1rem;" *ngIf='isfx' nzType="error" nzMessage="α、β 肾上腺受体阻断剂应禁止与胞磷胆碱钠片联合用药，前者易对后者产生抑制作用。联合用药会导致二者血药浓度增加，引起心动过缓以及血压下降等中毒症状，严重时甚至会引发心功能不全以及呼吸抑制与窒息等"></nz-alert>
                            
                        <nz-form-control class="my-font-table">
                            <!-- <app-wallet-table [data]="_data[0]?.list || []" [titleData]="_configY" [page]="_page" (tabelEvent)="onListClick($event)"></app-wallet-table> -->
                            <nz-table #columnTable *ngIf="_data[0]" [nzData]="_data[0]?.list" [nzHideOnSinglePage]='true'  [nzScroll]="{ x: '1100px', y: '350px'  }">
                                    <thead>
                                      <tr class="my-table">
                                        <th nzWidth="100px" >名称</th>
                                        <th nzWidth="80px" >规格</th>
                                        <th nzWidth="120px">包装规格</th>
                                        <th nzWidth="80px">开方数量</th>
                                        <th nzRight="100px" nzWidth="100px">流转标志</th>
                                        <th nzWidth="100px" nzRight="0px">备注</th>
                                      </tr>
                                    </thead>
                                    <tbody>
                                      <tr *ngFor="let data of _data[0]?.list" [ngStyle]="{'color': data.isJy === '不可流转' ? 'red' : '' } || {'color': data.fxyy ? '#fa7a14' : '' }" >
                                        <td >
                                            <img style="width: 1.5rem" *ngIf="data.fxyy" src="../../../../assets/img/警示.svg" alt="">
                                            <img style="width: 2rem" *ngIf="data.isJy === '不可流转' " src="../../../../assets/img/警示.svg" alt=""> {{ data.mc }}
                                        
                                        </td>
                                        <td >{{ data.gg }}</td>
                                        <td>{{ data.bzgg }}</td>
                                        <td>{{ data.kfsl }}</td>
                                        <td nzRight="100px">{{ data.isJy }}</td>
                                        <td nzRight="0px">{{ data.bhyy }}
                                        </td>
                                      </tr>
                                    </tbody>
                                  </nz-table>
                        </nz-form-control>
                    </div>
                </div>
                <div nz-row nzGutter="16">
                    <div nz-col nzSpan="24">
                        <nz-form-label><strong>医嘱</strong></nz-form-label>
                        <nz-form-control  class="my-font-t">
                        </nz-form-control>
                    </div>
                </div>
            </form>
    
            <div class="footer">
                <button type="button" (click)="close('返回')" class="ant-btn" style="margin-right: 8px;"><span>返回</span></button>
                <button *ngIf='isJy' type="button" (click)="close('签名上传')" class="ant-btn ant-btn-primary"><span>签名上传</span></button>
            </div>
    
        </nz-drawer>
</nz-content>

</div>


<nz-modal
    [nzWidth]=300
    
    [(nzVisible)]="isSpinning"
    [nzMask]=true
    [nzMaskClosable]=true
    [nzTitle]=null
    [nzFooter]=null
>
    <div nz-row >
        请使用浏览器上方签名工具签署
        <span nz-col nzSpan="14">正在签名中... </span>
        <nz-spin nzSimple nz-col nzSpan="10" *ngIf="!isOver" style="text-align: center"></nz-spin>
        <p *ngIf="isOver" style="text-align: center"> 完成</p>
    </div>
</nz-modal>